//
//  ViewControllerA.m
//  2.25
//
//  Created by student on 16/2/25.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "ViewControllerA.h"
#import "ViewControllerB.h"
#import "ViewControllerC.h"
@interface ViewControllerA ()<viewcontrollerdellegate>

@end

@implementation ViewControllerA
- (IBAction)back:(id)sender
{
    [self.view endEditing:YES];
}
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if([segue.identifier isEqualToString:@"gotob"])
    {
        
        ViewControllerB *vcb=segue.destinationViewController;
        vcb.username=self.username.text;
        vcb.password=self.password.text;
    }
    else if([segue.identifier isEqualToString:@"gotoc"])
    {
        ViewControllerC *vcc=segue.destinationViewController;
        vcc.delegate=self;
    }
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)tansusername:(NSString *)u andpassword:(NSString *)p andmail:(NSString *)m
{
    self.label.text=[NSString stringWithFormat:@"注册成功%@,%@,%@",u,p,m];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
